package com.rongcheng.frc.androidlib.net.requestCallback;

import com.rongcheng.frc.androidlib.net.interf.YXFileCallbackInterface;
import com.zhy.http.okhttp.callback.FileCallBack;

import java.io.File;

import okhttp3.Call;


/**
 * Created by FengRongCheng on 2016/6/19 11:46.
 * powered by yanxiu.com
 */
public abstract class YXFileCallBack extends FileCallBack implements YXFileCallbackInterface {


    public YXFileCallBack(String destFileDir, String destFileName) {
        super(destFileDir, destFileName);
    }

    @Override
    public void onError(Call call, Exception e, int id) {
        onFail(e.getMessage(), false);
    }

    @Override
    public void onResponse(File response, int id) {
        onSuccess(response, false);
    }

    @Override
    public void inProgress(float progress, long total, int id) {
        onProgress(progress, total);
    }

    @Override
    public void onCookieExpired() {

    }
}
